﻿<div class="common_content_wrapper">
	<div class="common_side_bar_wrapper">
		<div class="common_side_bar_panel">
			<h5>登录</h5>
			<div class="common_side_bar_panel_content">
			<div class="common_center_wrapper">
				<% form_for :merchant, :url => {:controller=> "merchant", :action => "try_login"} do |form|%>
				<table width="100%" border="0" cellpadding="0" cellspacing="1">
          <tr>
						<td><span>用户名<span></td>
						<td><span><%= form.text_field :username, :size => 20, :onchange => "check_username();" %></span></td>
					</tr>
					<tr>
						<td><span>密&nbsp;码<span></td>
						<td><span><%= form.password_field :password, :size =>20 %></span></td>
					</tr>
				</table>
				<br/>
				<%= submit_tag("登  录", :id => 'commit', :onclick => "return check_login();", :class => "common_button") %> 
				<input class="common_button" type="button" name="submit" value="注  册"/>
				<% end %>
			</div>
			</div>
		</div>
		<div class="common_side_bar_panel">
			<h5>最新加入的店</h5>
			<div class="common_side_bar_panel_content">
				<ul>
				<% for store in @recently_join_stroes%>
					<li><%= link_to " #{store.name}", {:controller => 'store', :action => 'show_store', :store_id => store} %></li><br/>
				<% end %>
				</ul>
			</div>
		</div>
	</div>
	<div class="common_main_wrapper">
		<div class="common_dot_area">
			地区检索： 
      <a href="#">黄浦</a> 
      <a href="#">静安</a> 
      <a href="#">卢湾</a> 
      <a href="#">徐汇</a> 
      <a href="#">长宁</a> 
      <a href="#">闸北</a> 
      <a href="#">普陀</a> 
      <a href="#">虹口</a> 
      <a href="#">杨浦</a> 
      <a href="#">浦东</a>
      <a href="#">闵行</a>
      <a href="#">松江</a>
      <a href="#">宝山</a>
      <a href="#">嘉定</a>
      <a href="#">青浦</a>
      <a href="#">奉贤</a>
      <a href="#">南汇</a>
      <a href="#">金山</a>
      <a href="#">崇明</a>
      <a href="#">上海高校</a>
		</div>
		<div class="common_main_panel">
			<h5>搜索</h5>
			<div class="common_side_bar_panel_content">
				<input type="text" name="seach_name" value="快速搜索..." size="40"/>&nbsp;
				<%= submit_tag("搜  索", :id => 'commit', :onclick => "return check_login();", :class => "common_button") %> 
			</div>
		</div>
		<div class="common_main_panel">
			<h5>广告</h5>
			<div class="common_side_bar_panel_content">
				<img src="images/banner/banner_show.png" name="banner"/>
			</div>
		</div>
		<div class="common_main_panel">
			<h5>分类</h5>
			<div class="common_side_bar_panel_content">
				<% i = 0 %>
				<% for category in @print_categories%>
				<%
						i = i + 1
						if (i % 3 == 0)
				%>
				<div class="category_wrapper_line">
				<% end %>
					<div class="category_wrapper">
						<ul>
								<span><%= category.name%></span><br/>
								<% if category.children.size >0 %>
										<%for sub_category in category.children%>
												<li><%= sub_category.name%></li>
										<% end %>
								<% end %>
						</ul>
					</div>
				<%
						if i % 3 == 0
				%>
				</div>
				<% end %>
				<% end %>
			</div>
		</div>
	</div>
</div>